{{ content() }}
<div id="dialog" title="Basic dialog" style="display: none;">
</div>
<section id="main">
    <div class="actions" style="margin: 20px auto; width: 600px">
        <select name="action" id="action">
            <option selected="selected">Tác vụ</option>
            <option value="edit">Chỉnh sửa</option>
            <option value="trash">Xóa</option>
        </select>
        <input type="submit" name="" id="actionbtn" class="button action" value="Áp dụng">
        <input type="submit" name="" id="add_type_btn" class="button action" value="Thêm loại tài liệu">
    </div>
    <div class="add_type" id="add_type">
        {{form('id':'adminForm','class':'adminForm')}}
        {{form.messages('addtype')}}
        <h2>Thêm loại tài liệu</h2>
        <span>Tên loại tài liệu:</span><br>
        <span class="add_type_input">{{form.render('name')}}</span>
        <span class="add_type_message">{{form.messages('name')}}</span>
        <input type="submit" name="" id="doaction" class="button action" value="Thêm">
        <input type="reset" name="" id="cancel_addtype" class="button action" value="Hủy">
        {{form.render('csrf',['value': security.getToken()])}}
        <!--{{form.messages('csrf')}}*/-->
        {{endform()}}
    </div>
    <div class="inline">
        <article class="manage_category module">
            <header>
                <h3 class="tabs_involved">Quản lý loại tài liệu</h3>                       
            </header>

            <div class="tab_container">
                <div class="tab_content">
                    <table class="tablesorter" cellspacing="0"> 
                        <thead> 
                            <tr> 
                                <th></th> 
                                <th>DocType</th>                                 
                                <th>Action</th> 
                            </tr> 
                        </thead> 
                        <tbody> 
                            {% for type in types %}
                            <tr> 
                                <td><input class="item" type="checkbox"  data-id="{{type.id}}" name="checkbox[]"></td> 
                                <td><input type="text" disabled id="category-name-{{type.id}}" class="category-name" value="{{type.name}}"/></td>                                
                                <td><input class="editbtn" id="editbtn-{{type.id}}" data-id="{{type.id}}" type="image" src="{{url('css/admin/images/icn_edit.png')}}" title="Edit"><input class="savebtn" id="savebtn-{{type.id}}" data-id="{{type.id}}" type="image" src="{{url('css/admin/images/icn_alert_success.png')}}" title="Save"><input type="image" class="deletebtn" data-id="{{type.id}}" src="{{url('css/admin/images/icn_trash.png')}}" title="Trash"></td> 
                            </tr> 
                            {% endfor %}
                        </tbody> 
                    </table>
                </div><!-- end of #tab1 -->
            </div><!-- end of .tab_container -->
        </article><!-- end of content manager article --> 
    </div>
</section>
{{javascript_include('js/admin/types.js')}}
